const str = "aaac342225he2z"
const sum = str.split("").reduce((pre, cur) => {
    pre[cur] ? pre[cur]++ : pre[cur] = 1
    return pre
}, {})
console.log(sum);

let BigKey = "";
let BigNum = 0;
for (let key of Object.keys(sum)) {
    if (sum[key] > BigNum) {
        BigNum = sum[key];
        BigKey = key;
    }
}

console.log("出现最多的字符是", BigKey);
console.log("出现最多的字符是次数是", BigNum);
